package org.niit.app

import org.apache.spark.SparkConf
import org.apache.spark.streaming.dstream.DStream
import org.niit.bean.AdClickData
import org.niit.common.TApp
import org.niit.controller.{AreaCityAdController, BlackListController}
import org.niit.handler.DataHandler

/**
 * Date:2025/5/29
 * Author：Ys
 * Description:
 */
object AdRealTimeApp extends TApp {


   start(appName = "AdRealTimeApp"){

     //直接去获取数据的代码 以及 调用 Controller代码
      val blackListController = new BlackListController
      val areaCityAdController = new AreaCityAdController
      //获得Kafka的数据
      val value: DStream[AdClickData] = DataHandler.KafkaDataHandler("BD1", "AD1")

      blackListController.dispath(value)
      areaCityAdController.dispatch(value)

      DataHandler.startAndAwait()

   }

}
